package Thread;

public class Demo4 {
    //实现Runnable接口，重写run方法，使用匿名内部类：
    public static void main(String[] args) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("线程运行中...");
            }
        });
        thread.start();
    }
}
